package cn.com.huzo.model.entities.manufacture;

import huzofw.model.entities.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.io.Serializable;
import java.sql.Timestamp;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 生产跟单主记录实体类
 * <p>
 * @author 范学春
 */
public class PmsHeaderEntity extends BaseEntity implements Serializable {

    private static final long serialVersionUID = -3240761952077339625L;
    private Long HeaderId;
    private Long MoId;         // 指示书Id 
    private String NoOfStyle;  // 款号
    private String ProductCategoryName; // 品类   
    private Timestamp DateOfIssue;      // 合同日期
    private String NoOfContract;        // 合同号
    private Float QuantityOfPlan;       // 合同数量
    private Float QuantityOfReal;       // 完成数量
    private Timestamp DateOfShipping;   // 船期  
    private String OverFlag;            // 完成标记  
    private String SewingTrouble;       // 缝制问题
    private String MaterialTrouble;     // 材料问题

    public Long getHeaderId() {
        return HeaderId;
    }

    public void setHeaderId(Long HeaderId) {
        this.HeaderId = HeaderId;
    }

    public Long getMoId() {
        return MoId;
    }

    public void setMoId(Long MoId) {
        this.MoId = MoId;
    }

    public String getNoOfStyle() {
        return NoOfStyle;
    }

    public void setNoOfStyle(String NoOfStyle) {
        this.NoOfStyle = NoOfStyle;
    }

    public String getProductCategoryName() {
        return ProductCategoryName;
    }

    public void setProductCategoryName(String ProductCategoryName) {
        this.ProductCategoryName = ProductCategoryName;
    }

    public String getNoOfContract() {
        return NoOfContract;
    }

    public void setNoOfContract(String NoOfContract) {
        this.NoOfContract = NoOfContract;
    }

    public Float getQuantityOfPlan() {
        return QuantityOfPlan;
    }

    public void setQuantityOfPlan(Float QuantityOfPlan) {
        this.QuantityOfPlan = QuantityOfPlan;
    }

    public Float getQuantityOfReal() {
        return QuantityOfReal;
    }

    public void setQuantityOfReal(Float QuantityOfReal) {
        this.QuantityOfReal = QuantityOfReal;
    }

    public String getOverFlag() {
        return OverFlag;
    }

    public void setOverFlag(String OverFlag) {
        this.OverFlag = OverFlag;
    }

    public String getSewingTrouble() {
        return SewingTrouble;
    }

    public void setSewingTrouble(String SewingTrouble) {
        this.SewingTrouble = SewingTrouble;
    }

    public String getMaterialTrouble() {
        return MaterialTrouble;
    }

    public void setMaterialTrouble(String MaterialTrouble) {
        this.MaterialTrouble = MaterialTrouble;
    }

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    public Timestamp getDateOfIssue() {
        return DateOfIssue;
    }

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    public Timestamp getDateOfShipping() {
        return DateOfShipping;
    }

    public void setDateOfShipping(Timestamp DateOfShipping) {
        this.DateOfShipping = DateOfShipping;
    }

    public void setDateOfIssue(Timestamp DateOfIssue) {
        this.DateOfIssue = DateOfIssue;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (!(o instanceof PmsHeaderEntity)) {
            return false;
        }

        final PmsHeaderEntity that = (PmsHeaderEntity) o;

        return new EqualsBuilder()
            .append(this.getHeaderId(), that.getHeaderId())
            .isEquals();
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public int hashCode() {
        int result = 17;
        result = 31 * result + getHeaderId().hashCode();

        return result;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public String toString() {
        return ToStringBuilder.reflectionToString(this);
    }
}
